//
//  FrameDemo.swift
//  firstFontAttrDemo
//
//  Created by liy on 2025/1/20.
//

import SwiftUI

struct FrameDemo: View {
  var body: some View {
    Text("Hello, World!")
//      .frame(width: 200, height: 100, alignment: .topLeading)
      .background(.red)

    // frame也可以叠加使用
    //				.frame(width: 300, height: 500)
    //				.background(.orange)
		
		// 最小值 理想值 最大值
			.frame(minWidth: 10, idealWidth: 100, maxWidth: .infinity, minHeight: 50, idealHeight: 100, maxHeight: 300, alignment: .center)
			.background(.orange)
  }
}

#Preview {
  FrameDemo()
}
